In recent years, code readers capable of tracing articles in distribution channels from a manufacturing stage to a consumption stage or a disposal stage, so called traceability, have been considered important, and such code readers for the purpose of the traceability have become popular. Further, other than the traceability, the code readers have been used in various fields.
In general, the code readers have a configuration to read images of bar codes or two-dimensional codes, etc., which are attached to workpieces, and the codes on the obtained images are read and binarized by image processing, and they are decoded so as to read information. The code readers are the devices which optically read information, so that it is also called as optical information reading devices.
In such type of the optical information reading device, a reading depth of a camera, that is, a focusing range of a camera lens, is one of the important features. That is, at the site where plural types of workpieces in different sizes mixedly exist, there is a case in which a distance between codes and the camera changes depending on the size. Further, even though the plural types of workpieces do not mixedly exist, when the type of the workpieces changes on a production line, there is a case in which a distance between codes and the camera changes. In such cases, in order to read the codes without changing a camera position, it is preferred that the reading depth of the camera is deep.
In order to set the reading depth of the camera to be deep, the diaphragm of the lens can be reduced. However, when the diaphragm of the lens is reduced, the light amount (brightness) which is received by the imaging element lacks. Further, when the distance between the code and the camera increases, the light amount lacks as well. When the light amount lacks, the contrast of the obtained images becomes low, and therefore, the reading accuracy deteriorates.
For example, as described in Japanese Patent Application Publication No. 2016-33787, in order to compensate the deficiency in light amount, a tuning process, which automatically sets an exposure time or a gain of the camera to be an optimum value, was performed at the time before the actual operation, that is, at the time of setting.